package com.hb.guli.service.edu.controller;

import com.hb.guli.common.base.result.R;
import org.springframework.web.bind.annotation.*;

@CrossOrigin
@RestController
@RequestMapping("user")
public class LoginController {

    @PostMapping("login")
    public R login(){
        return R.ok().data("token","admin");
    }

    @GetMapping("info")
    public R getInfo(){
        return R.ok()
                .data("name","admin")
                .data("roles","[admin]")
                .data("avatar","https://p3-passport.byteimg.com/img/user-avatar/2bcd7dcfed80e989872fa060f838954f~180x180.awebp");
    }

    @PostMapping("logout")
    public R logout(){
        return R.ok();
    }
}
